// components-biz/column-content/index.js
const { BaseBehavior, COMPONENT_OPTIONS } = require('../../mixins/component');
const { LAYOUT_TYPE } = require('../../constants/types');

const COL_SPAN_VALUE = {
    [LAYOUT_TYPE.oneToOne]: 24,
    [LAYOUT_TYPE.oneToTwo]: 12,
    [LAYOUT_TYPE.oneToThree]: 8,
    [LAYOUT_TYPE.oneToMore]: 6,
};

// small middle larger column
const GOODS_SIZE_VALUE = {
    [LAYOUT_TYPE.oneToOne]: 'column',
    [LAYOUT_TYPE.oneToTwo]: 'larger',
    [LAYOUT_TYPE.oneToThree]: 'middle',
    [LAYOUT_TYPE.oneToMore]: 'small',
};

Component({
    behaviors: [BaseBehavior],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        goodsList: {
            type: Array,
            value: [],
        },
        type: {
            type: String,
            value: LAYOUT_TYPE.oneToOne,
        },
    },
    data: {
        layoutType: LAYOUT_TYPE,
        colSpanValue: COL_SPAN_VALUE,
        goodsSizeValue: GOODS_SIZE_VALUE,
    },
    methods: {

    }
})
